{"ast":null,"code":"var _s = $RefreshSig$();\nimport React from 'react';\nimport { observer } from \"mobx-react-lite\";\nimport { Context } from \"../index\";\nimport { Fragment as _Fragment } from \"react/jsx-dev-runtime\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nconst GetUserDialog = props => {\n  _s();\n  const {\n    store\n  } = React.useContext(Context);\n  const [chat, setChat] = React.useState();\n  if (!props.selfProfile) {\n    store.getChats().items.forEach(itemChat => {\n      if (!itemChat.multiChat) {\n        var _itemChat$membership;\n        (_itemChat$membership = itemChat.membership) === null || _itemChat$membership === void 0 ? void 0 : _itemChat$membership.items.forEach(itemMember => {\n          if (itemMember.usersListItem.id === props.profile.id) {\n            setChat({\n              ...chat,\n              ...itemChat\n            });\n            console.log(chat);\n          }\n        });\n      }\n    });\n  }\n  return /*#__PURE__*/_jsxDEV(_Fragment, {}, void 0, false);\n};\n_s(GetUserDialog, \"d53onFzHZC/S6cdDS+glkKoPBrE=\");\n_c = GetUserDialog;\nexport default _c2 = observer(GetUserDialog);\nvar _c, _c2;\n$RefreshReg$(_c, \"GetUserDialog\");\n$RefreshReg$(_c2, \"%default%\");","map":{"version":3,"names":["React","observer","Context","GetUserDialog","props","store","useContext","chat","setChat","useState","selfProfile","getChats","items","forEach","itemChat","multiChat","membership","itemMember","usersListItem","id","profile","console","log"],"sources":["/data/messenger.client/src/containers/GetUserDialog.tsx"],"sourcesContent":["import React from 'react';\nimport {observer} from \"mobx-react-lite\";\nimport {Context} from \"../index\";\nimport {GetUserDialog as GetUserDialogComponent} from \"../components\";\nimport {UserProfileProps} from \"../models/props/UserProfileProps\";\nimport {ChatsListItem} from \"../models/response/ChatsListItem\";\n\nconst GetUserDialog: React.FC<UserProfileProps> = (props) => {\n    const {store} = React.useContext(Context);\n    const [chat, setChat] = React.useState<ChatsListItem>();\n\n\n        if (!props.selfProfile) {\n            store.getChats().items.forEach((itemChat) => {\n                if (!itemChat.multiChat) {\n                    itemChat.membership?.items.forEach((itemMember) => {\n                        if (itemMember.usersListItem.id === props.profile.id) {\n                            setChat({\n                                ...chat,\n                                ...itemChat\n                            });\n                            console.log(chat)\n                        }\n                    });\n                }\n            });\n        }\n\n\n\n    return (<></>);\n}\n\nexport default observer(GetUserDialog);"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,QAAQ,QAAO,iBAAiB;AACxC,SAAQC,OAAO,QAAO,UAAU;AAAC;AAAA;AAKjC,MAAMC,aAAyC,GAAIC,KAAK,IAAK;EAAA;EACzD,MAAM;IAACC;EAAK,CAAC,GAAGL,KAAK,CAACM,UAAU,CAACJ,OAAO,CAAC;EACzC,MAAM,CAACK,IAAI,EAAEC,OAAO,CAAC,GAAGR,KAAK,CAACS,QAAQ,EAAiB;EAGnD,IAAI,CAACL,KAAK,CAACM,WAAW,EAAE;IACpBL,KAAK,CAACM,QAAQ,EAAE,CAACC,KAAK,CAACC,OAAO,CAAEC,QAAQ,IAAK;MACzC,IAAI,CAACA,QAAQ,CAACC,SAAS,EAAE;QAAA;QACrB,wBAAAD,QAAQ,CAACE,UAAU,yDAAnB,qBAAqBJ,KAAK,CAACC,OAAO,CAAEI,UAAU,IAAK;UAC/C,IAAIA,UAAU,CAACC,aAAa,CAACC,EAAE,KAAKf,KAAK,CAACgB,OAAO,CAACD,EAAE,EAAE;YAClDX,OAAO,CAAC;cACJ,GAAGD,IAAI;cACP,GAAGO;YACP,CAAC,CAAC;YACFO,OAAO,CAACC,GAAG,CAACf,IAAI,CAAC;UACrB;QACJ,CAAC,CAAC;MACN;IACJ,CAAC,CAAC;EACN;EAIJ,oBAAQ,qCAAK;AACjB,CAAC;AAAA,GAxBKJ,aAAyC;AAAA,KAAzCA,aAAyC;AA0B/C,qBAAeF,QAAQ,CAACE,aAAa,CAAC;AAAC;AAAA;AAAA"},"metadata":{},"sourceType":"module"}